-
-
Notifications
You must be signed in to change notification settings - Fork 465
feat(metrics): [Trace Metrics 16] Only send user attributes if sendDefaultPii is true #4995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 12-19-android_metrics_batch_processor_and_factory
Are you sure you want to change the base?
Conversation
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- [Trace Metrics 16] Only send user attributes if sendDefaultPii is true ([#4995](https://github.com/getsentry/sentry-java/pull/4995))If none of the above apply, you can opt out of this check by adding |
106a66c to
6cdbfb7
Compare
c3c0f3b to
0116a6b
Compare
Performance metrics 🚀
|
| "sentry.release", new SentryLogEventAttributeValue(SentryAttributeType.STRING, release)); | ||
| } | ||
|
|
||
| if (Platform.isJvm()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be guarded by sendDefaultPii as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't able to find a sendDefaultPii check for server name in other places and there's a dedicated option (isAttachServerName) for this too. So this seems to align with what we do in other places.
|
|
||
| setUser(attributes); | ||
| if (scopes.getOptions().isSendDefaultPii()) { | ||
| setUser(attributes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least on Android [we always seem to at least set the installation id] when no user is manually set, (
Lines 168 to 173 in 3258517
| if (user.getId() == null) { | |
| user.setId(options.getRuntimeManager().runWithRelaxedPolicy(() -> Installation.id(context))); | |
| } | |
| if (user.getIpAddress() == null && options.isSendDefaultPii()) { | |
| user.setIpAddress(IpAddressUtils.DEFAULT_IP_ADDRESS); | |
| } |
Doesn't need to be addressed here, but maybe worth talking about (also affects logs).

📜 Description
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps